import request from '@/utils/request'
import qs from 'qs'

// 获取商户列表
export function getCorporationAll() {
  return request({
    url: "/api/corp/getCorporationAll",
    method: "post"
  });
}

// 创建商户-批量
export function createCorp(data) {
  return request({
    url: "/api/corp/create",
    method: "post",
    data
  });
}

// 删除商户-批量
export function deleteCorp(data) {
  return request({
    url: "/api/corp/delete",
    method: "post",
    data
  });
}

// 修改商户-批量
export function updateCorp(data) {
  return request({
    url: "/api/corp/update",
    method: "post",
    data
  });
}

// 根据商户id获取商户信息-批量
export function getCorporationByIds(data) {
  return request({
    url: "/api/corp/getCorporationByIds",
    method: "post",
    data
  });
}

// 添加商户管理员
export function addCorpAdmin(data) {
  return request({
    url: "/api/admin/user/corp/admin/add",
    method: "post",
    data: qs.stringify(data)
  });
}

// 删除商户管理员-批量
export function delCorpAdminBatch(data) {
  return request({
    url: "/api/admin/user/corp/admin/del/batch",
    method: "post",
    data: qs.stringify(data)
  });
}

// 删除商户管理员-单个
export function delCorpAdmin(data) {
  return request({
    url: "/api/admin/user/corp/admin/del",
    method: "post",
    data: qs.stringify(data)
  });
}

// 商户管理员列表
export function getCorpAdminList(data) {
  return request({
    url: "/api/admin/user/corp/admin/list",
    method: "post",
    data: qs.stringify(data)
  });
}
